package com.miracle.common;


import com.alibaba.android.arouter.launcher.ARouter;
import com.miracle.basemvp.AppConfig;
import com.miracle.basemvp.base.BaseApplication;

/**
 * com.miracle.common
 * (c)2018 AIR Times Inc. All rights reserved.
 *
 *
 * @author WangJQ
 * @version 1.0
 * @date 2018/6/28 16:37
 * @see com.miracle.common
 */
public class CommonApplication extends BaseApplication {
    @Override
    public void onCreate() {
        super.onCreate();
        //在此处对url地址进行更改.
        AppConfig.BASE_URL = CommonConfig.BASE_URL;
        initARouter(this);
    }

    /**
     * 初始化路由
     * @param application
     */
    private void initARouter(CommonApplication application) {
        ARouter.openLog();     // 打印日志
        ARouter.openDebug();// 开启调试模式(如果在InstantRun模式下运行，必须开启调试模式！线上版本需要关闭,否则有安全风险)
        ARouter.init(application);
    }
}
